package com.example.yls.demoa;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.btn_null).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String str=null;
                char a=str.charAt(0);
                Log.e("MainActivity",String.valueOf(a));
            }
        });
    }
}
